from google.appengine.ext import db

class MsgHelper:
    def make_TRACE(self):
        msg=Msg(sender_type='GATE',receiver_type='BOT')
        return msg
        
class MsgHandler:
    def on_input(self):
        pass
    def on_output(self):
        pass
    
    def handle(self):
        pass

class Msg(db.Model):
    sender_type =db.StringProperty(required =True)    
    sender_address  =db.StringProperty()
    receiver_type =db.StringProperty(required =True)
    receiver_address  =db.StringProperty()
    
    time_stamp  =db.DateTimeProperty(auto_now_add=True)
    direction   =   db.StringProperty()
    
    body = db.TextProperty()

    
    